03. Video: NULLs and Aggregation
Data Types and NULLs
Notice that NULL s are different than a zero - they are cells where data does not exist.
When identifying
NULL
s in a
WHERE
clause, we write
IS NULL
or
IS NOT NULL
. We don't use
=
, because
NULL
isn't considered a value in SQL. Rather, it is a property of the data.
NULLs - Expert Tip
There are two common ways in which you are likely to encounter NULL s:
-
NULL s frequently occur when performing a LEFT or RIGHT JOIN . You saw in the last lesson - when some rows in the left table of a left join are not matched with rows in the right table, those rows will contain some NULL values in the result set.
-
NULL s can also occur from simply missing data in our database.